package org.recruit.system.service.impl;

import java.util.List;

import org.recruit.system.domain.CompanyRecruit;
import org.recruit.system.mapper.CompanyRecruitMapper;
import org.recruit.system.service.ICompanyRecruitService;
import org.recruit.system.utils.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 招聘信息Service业务层处理
 *
 * @author teapot
 * @date 2020-11-12
 */
@Service
public class CompanyRecruitServiceImpl implements ICompanyRecruitService {
    @Autowired
    private CompanyRecruitMapper companyRecruitMapper;

    /**
     * 查询招聘信息
     *
     * @param id 招聘信息ID
     * @return 招聘信息
     */
    @Override
    public CompanyRecruit selectCompanyRecruitById(Long id) {
        return companyRecruitMapper.selectCompanyRecruitById(id);
    }

    /**
     * 查询招聘信息列表
     *
     * @param companyRecruit 招聘信息
     * @return 招聘信息
     */
    @Override
    public List<CompanyRecruit> selectCompanyRecruitList(CompanyRecruit companyRecruit) {
        return companyRecruitMapper.selectCompanyRecruitList(companyRecruit);
    }

    /**
     * 新增招聘信息
     *
     * @param companyRecruit 招聘信息
     * @return 结果
     */
    @Override
    public int insertCompanyRecruit(CompanyRecruit companyRecruit) {
        return companyRecruitMapper.insertCompanyRecruit(companyRecruit);
    }

    /**
     * 修改招聘信息
     *
     * @param companyRecruit 招聘信息
     * @return 结果
     */
    @Override
    public int updateCompanyRecruit(CompanyRecruit companyRecruit) {
        return companyRecruitMapper.updateCompanyRecruit(companyRecruit);
    }

    /**
     * 删除招聘信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCompanyRecruitByIds(String ids) {
        return companyRecruitMapper.deleteCompanyRecruitByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除招聘信息信息
     *
     * @param id 招聘信息ID
     * @return 结果
     */
    @Override
    public int deleteCompanyRecruitById(Long id) {
        return companyRecruitMapper.deleteCompanyRecruitById(id);
    }
}
